package com.share.example.spider.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.share.example.spider.mapper.FundMapper;
import com.share.example.spider.model.db.Fund;
import com.share.example.spider.service.IFundService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 基金表  服务实现类
 * </p>
 *
 * @author author
 * @since 2022-07-23
 */
@Service
public class FundServiceImpl extends ServiceImpl<FundMapper, Fund> implements IFundService {

    @Override
    public List<String> listAll(Integer status) {
        List<Fund> funds = baseMapper.selectList(null);
        return funds.stream().map(e -> e.getFundCode()).collect(Collectors.toList());
    }
}
